package com.vertx.starter.rxjava;

/**
 * 接口互调
 */
public class SimpleRxJava {


    public static void main(String[] args) {

        IA ia = new IA() {
            @Override
            public void subscribe(IB ib) {
                ib.onNext("123");
                ib.onError();
                ib.onComplete();
            }
        };

        IB ib = new IB() {
            @Override
            public void onNext(String aa) {
                System.out.println("123");
            }

            @Override
            public void onError() {
                System.out.println("ERROR");
            }

            @Override
            public void onComplete() {
                System.out.println("COMPLETE");
            }
        };

        ia.subscribe(ib);
    }

}
